unit MyActiveApp_TLB;

// ************************************************************************ //
// WARNING                                                                    
// -------                                                                    
// The types declared in this file were generated from data read from a       
// Type Library. If this type library is explicitly or indirectly (via        
// another type library referring to this type library) re-imported, or the   
// 'Refresh' command of the Type Library Editor activated while editing the   
// Type Library, the contents of this file will be regenerated and all        
// manual modifications will be lost.                                         
// ************************************************************************ //

// PASTLWTR : $Revision:   1.88  $
// File generated on 4/24/2000 3:35:26 PM from Type Library described below.

// *************************************************************************//
// NOTE:                                                                      
// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties  
// which return objects that may need to be explicitly created via a function 
// call prior to any access via the property. These items have been disabled  
// in order to prevent accidental use from within the object inspector. You   
// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively   
// removing them from the $IFDEF blocks. However, such items must still be    
// programmatically created via a method of the appropriate CoClass before    
// they can be used.                                                          
// ************************************************************************ //
// Type Lib: D:\Stock\CD-A\Delphi Book\Source\Active Server Page\Final\MyActiveApp.tlb (1)
// IID\LCID: {C2FA6AD4-3AB1-47A4-A774-EA33CA776CEB}\0
// Helpfile: 
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINNT\System32\stdole2.tlb)
//   (2) v4.0 StdVCL, (C:\WINNT\System32\STDVCL40.DLL)
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
interface

uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL;

// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:        
//   Type Libraries     : LIBID_xxxx                                      
//   CoClasses          : CLASS_xxxx                                      
//   DISPInterfaces     : DIID_xxxx                                       
//   Non-DISP interfaces: IID_xxxx                                        
// *********************************************************************//
const
  // TypeLibrary Major and minor versions
  MyActiveAppMajorVersion = 1;
  MyActiveAppMinorVersion = 0;

  LIBID_MyActiveApp: TGUID = 
              '{C2FA6AD4-3AB1-47A4-A774-EA33CA776CEB}';

  IID_IActiveObject: TGUID = 
              '{93469EC3-DB2D-4601-8721-E9FB37C0DA06}';

  CLASS_ActiveObject: TGUID = 
              '{2AF0093E-B3C4-42CA-8137-BE1AE4BE8F75}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  IActiveObject = interface;
  IActiveObjectDisp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  ActiveObject = IActiveObject;


// *********************************************************************//
// Interface: IActiveObject
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {93469EC3-DB2D-4601-8721-E9FB37C0DA06}
// *********************************************************************//
  IActiveObject = interface(IDispatch)
    ['{93469EC3-DB2D-4601-8721-E9FB37C0DA06}']
    function  XYZ: WideString; safecall;
  end;

// *********************************************************************//
// DispIntf:  IActiveObjectDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {93469EC3-DB2D-4601-8721-E9FB37C0DA06}
// *********************************************************************//
  IActiveObjectDisp = dispinterface
    ['{93469EC3-DB2D-4601-8721-E9FB37C0DA06}']
    function  XYZ: WideString; dispid 1;
  end;

// *********************************************************************//
// The Class CoActiveObject provides a Create and CreateRemote method to          
// create instances of the default interface IActiveObject exposed by              
// the CoClass ActiveObject. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoActiveObject = class
    class function Create: IActiveObject;
    class function CreateRemote(
                    const MachineName: string): IActiveObject;
  end;

//...a lc bt

implementation

uses ComObj;

class function CoActiveObject.Create: IActiveObject;
begin
  Result := CreateComObject(CLASS_ActiveObject) 
                                                                   as IActiveObject;
end;

class function CoActiveObject.CreateRemote(
                       const MachineName: string): IActiveObject;
begin
  Result := CreateRemoteComObject(
        MachineName, CLASS_ActiveObject) as IActiveObject;
end;

//...a lc bt

end.
